import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import LargeScreen from '../views/LargeScreen.vue'

Vue.use(VueRouter);

const routes = [
  {
    path: '/home',
    name: 'home',
    component: Home,
    redirect: '/overallProcess',
    children: [

      {
        path: '/overallProcess',
        name: 'overallProcess',
        meta: {
          title: '整体工艺流程',
        },
        component: () => import('../components/overallProcess/Index.vue'),
      },

      {
        path: '/dqzjx',
        name: 'dqzjx',
        meta: {
          title: '电气主接线',
        },
        component: () => import('../components/dqzjx/Index.vue'),
      },

      {
        path: '/sbjc',
        name: 'sbjc',
        meta: {
          title: '设备监测',
        },
        component: () => import('../components/sbjc/Index.vue'),
        redirect: '/zqxt',
        children: [
          {
            path: '/zqxt',
            name: 'zqxt',
            meta: {
              title: '制氢系统',
            },
            component: () => import('../components/zqxt/Index.vue'),
          },
          {
            path: '/rldc',
            name: 'rldc',
            meta: {
              title: '燃料电池',
            },
            component: () => import('../components/rldc/Index.vue'),
          },
          {
            path: '/jqj',
            name: 'jqj',
            meta: {
              title: '加氢机',
            },
            component: () => import('../components/jqj/Index.vue'),
          },
          {
            path: '/ysj',
            name: 'ysj',
            meta: {
              title: '压缩机',
            },
            component: () => import('../components/ysj/Index.vue'),
          },
          {
            path: '/nbq',
            name: 'nbq',
            meta: {
              title: '逆变器',
            },
            component: () => import('../components/nbq/Index.vue'),
          },
          {
            path: '/cqg',
            name: 'cqg',
            meta: {
              title: '储气罐',
            },
            component: () => import('../components/cqg/Index.vue'),
          },
        ]
      },

      {
        path: '/ycgl',
        name: 'ycgl',
        meta: {
          title: '预测管理',
        },
        component: () => import('../components/ycgl/Index.vue'),
      },

      {
        path: '/nlgl',
        name: 'nlgl',
        meta: {
          title: '能量管理',
        },
        component: () => import('../components/nlgl/Index.vue'),
        redirect: '/clgl',
        children: [
          {
            path: '/clgl',
            name: 'clgl',
            meta: {
              title: '策略管理',
            },
            component: () => import('../components/clgl/Index.vue'),
          },
          {
            path: '/zzjhpz',
            name: 'zzjhpz',
            meta: {
              title: '组合计划配置',
            },
            component: () => import('../components/zzjhpz/Index.vue'),
          },
          {
            path: '/jhqxpz',
            name: 'jhqxpz',
            meta: {
              title: '计划曲线配置',
            },
            component: () => import('../components/jhqxpz/Index.vue'),
          },
        ]
      },

      {
        path: '/aqgl',
        name: 'aqgl',
        meta: {
          title: '安全管理',
        },
        component: () => import('../components/aqgl/Index.vue'),
        redirect: '/aqpg',
        children: [
          {
            path: '/aqpg',
            name: 'aqpg',
            meta: {
              title: '安全评估',
            },
            component: () => import('../components/aqpg/Index.vue'),
          },
          {
            path: '/zstp',
            name: 'zstp',
            meta: {
              title: '知识图谱',
            },
            component: () => import('../components/zstp/Index.vue'),
          },
          {
            path: '/ldcl',
            name: 'ldcl',
            meta: {
              title: '联动策略',
            },
            component: () => import('../components/ldcl/Index.vue'),
          },
          {
            path: '/gzzd',
            name: 'gzzd',
            meta: {
              title: '故障诊断',
            },
            component: () => import('../components/gzzd/Index.vue'),
          },
        ]
      },

      {
        path: '/gjgl',
        name: 'gjgl',
        meta: {
          title: '告警管理',
        },
        component: () => import('../components/gjgl/Index.vue'),
        redirect: '/gjgzcx',
        children: [
          {
            path: '/gjgzcx',
            name: 'gjgzcx',
            meta: {
              title: '告警故障查询',
            },
            component: () => import('../components/gjgzcx/Index.vue'),
          },
          {
            path: '/gjgztjyfx',
            name: 'gjgztjyfx',
            meta: {
              title: '告警故障统计与分析',
            },
            component: () => import('../components/gjgztjyfx/Index.vue'),
          },
        ]
      },

      {
        path: '/rzgl',
        name: 'rzgl',
        meta: {
          title: '日志管理',
        },
        component: () => import('../components/rzgl/Index.vue'),
      },

      {
        path: '/gzyq',
        name: 'gzyq',
        meta: {
          title: '规则引擎',
        },
        component: () => import('../components/gzyq/Index.vue'),
      },

      {
        path: '/sjtj',
        name: 'sjtj',
        meta: {
          title: '数据统计',
        },
        component: () => import('../components/sjtj/Index.vue'),
        redirect: '/gjgzcx',
        children: [
          {
            path: '/sjyxqxcx',
            name: 'sjyxqxcx',
            meta: {
              title: '数据运行曲线查询',
            },
            component: () => import('../components/sjyxqxcx/Index.vue'),
          },
          {
            path: '/bbsc',
            name: 'bbsc',
            meta: {
              title: '报表生成',
            },
            component: () => import('../components/bbsc/Index.vue'),
          },
        ]
      },

      {
        path: '/sbgl',
        name: 'sbgl',
        meta: {
          title: '设备管理',
        },
        component: () => import('../components/sbgl/Index.vue'),
      },

      {
        path: '/ywgl',
        name: 'ywgl',
        meta: {
          title: '运维管理',
        },
        component: () => import('../components/ywgl/Index.vue'),
      },

      {
        path: '/xtgl',
        name: 'xtgl',
        meta: {
          title: '系统管理',
        },
        component: () => import('../components/xtgl/Index.vue'),
        redirect: '/tdgl',
        children: [
          {
            path: '/tdgl',
            name: 'tdgl',
            meta: {
              title: '通道管理',
            },
            component: () => import('../components/tdgl/Index.vue'),
          },
          {
            path: '/gzgl',
            name: 'gzgl',
            meta: {
              title: '规约管理',
            },
            component: () => import('../components/gzgl/Index.vue'),
          },
          {
            path: '/xtycgl',
            name: 'xtycgl',
            meta: {
              title: '遥测管理',
            },
            component: () => import('../components/xtycgl/Index.vue'),
          },
          {
            path: '/yxgl',
            name: 'yxgl',
            meta: {
              title: '遥信管理',
            },
            component: () => import('../components/yxgl/Index.vue'),
          },
          {
            path: '/yhgl',
            name: 'yhgl',
            meta: {
              title: '用户管理',
            },
            component: () => import('../components/yhgl/Index.vue'),
          },
        ]
      },

    ],
  },
  {
    path: '/',
    name: 'largeScreen',
    component: LargeScreen,
    meta: {
      navBarHide: true,
    },
  },
];

const router = new VueRouter({
  routes
})

export default router
